﻿using System;
using System.Collections.Generic;
using System.Text;

namespace WorkNodeFramework
{
    [AttributeUsage(AttributeTargets.Class,AllowMultiple=false)]
    public class WorkNodeTypeAttribute:Attribute
    {
        string name;
        string properties;
        string langProperties;

        public WorkNodeTypeAttribute(string Name)
        {
            this.name = Name;
        }

        public string Name {
            get {
                return name;
            }
        }

        public string Properties {
            get {
                if (string.IsNullOrEmpty(properties))
                    return Name + "Properties";
                return properties;
            }
            set {
                properties = value;
            }
        }

        public string LangProperties {
            get {
                if (string.IsNullOrEmpty(langProperties))
                    return Name + "LangProperties";
                return langProperties;
            }
            set {
                langProperties = value;
            }
        }

        bool duplicateName = false;
        public bool AllowDuplicateName {
            get {
                return duplicateName;
            }
            set {
                duplicateName = value;
            }
        }

        bool nameRequired = false;
        public bool NameRequired {
            get {
                return nameRequired;
            }
            set {
                nameRequired = value;
            }
        }
    }
}
